package com.hzjy.manage.controller;


import com.hzjy.common.core.controller.BaseController;
import com.hzjy.common.core.domain.AjaxResult;
import com.hzjy.common.core.page.TableDataInfo;
import com.hzjy.common.utils.PageData;
import com.hzjy.manage.service.impl.HzjyProductServiceImpl;
import com.hzjy.manage.vo.HzjyDelistVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 摘牌审核记录-终审
 *
 * @author hzjy
 * @date 2020-08-23
 */
@RestController
@RequestMapping("/manage/negotiable_prices")
public class NegotiablePricesController extends BaseController {

    @Autowired
    private HzjyProductServiceImpl hzjyProductService;


    /**
     * 查询摘牌终审通过列表
     */
    @PreAuthorize("@ss.hasPermi('manage:audit_delist_data_final:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody HzjyDelistVO hzjyDelist)
    {
        startPage();
        List<HzjyDelistVO> hzjyDelists = hzjyProductService.selectHzjyDelistFinalList(hzjyDelist);
        return getDataTable(hzjyDelists);
    }

    /**
     * 面议价格
     * @param
     * @return
     */
    @ApiOperation("面议价格")
    @PreAuthorize("@ss.hasPermi('manage:negotiable_Prices:add')")
    @PostMapping("/negotiablePrices")
    public AjaxResult negotiablePrices(@RequestBody PageData pd){
        hzjyProductService.updateHzjyProduct(pd);
        return AjaxResult.success();
    }
}
